﻿using System;
using System.Collections.Generic;
using System.Text;
using NIIT.SaoBacDau.Aupi.HospitalManagement.DataAccess;
using NIIT.SaoBacDau.Aupi.HospitalManagement.Entities;
using System.Text.RegularExpressions;

namespace NIIT.SaoBacDau.Aupi.HospitalManagement.BusinessLogic
{

    public class BL_Pa_DetailsMedical
    {
        public static int DetailsMedical()
        {
            return DAO_Pa_DetailsMedical.DetailsMedical().DetailsMedicalID;
        }

        public static Pa_DetailsMedical SearchDetailsMedical(Pa_DetailsMedical pa_Details)
        {
            return DAO_Pa_DetailsMedical.DetailsMedical(pa_Details);
        }
        public static void AddDetailsMedical(Pa_DetailsMedical detailsMedical)
        {
            DAO_Pa_DetailsMedical.AddDetailsMedical(detailsMedical);
        }

        public static List<Pa_DetailsMedical> ListDetailsMedical(int value, int to)
        {
            return DAO_Pa_DetailsMedical.ListDetailsMedical(value, to);
        }

        public static Pa_DetailsMedical Pa_DetailsMedical(Pa_Patient patient)
        {
            return DAO_Pa_DetailsMedical.DetailsMedical(patient);
        }
        public static bool CheckContentSearch(HM_TypeSearchMedicalHistory hM_TypeSearchMedicalHistory, string DetailsMedicalID)
        {
            Regex rnumber = new Regex(@"\d");
            if (rnumber.IsMatch(DetailsMedicalID) == false)
                return false;
            else
                return true;
        }
    }
}
